global simulinkFileName;
simulinkModeName="sanxiangsanxian_simpleV4";
simulinkFileName=simulinkModeName+"/";
dayPowerDataFilePath='20210518.xlsx';
dayPowerData=xlsread(dayPowerDataFilePath,1);
dayPowerData_Power=dayPowerData(:,1);
dayPowerData_RPower=dayPowerData(:,5);
dynamicDayPowerLineData_temp=dayPowerData_Power-1;
dynamicDayRPowerLineData_temp=dayPowerData_RPower;
dynamicDayPowerLineData=[0;0;0;0;dynamicDayPowerLineData_temp];
dynamicDayRPowerLineData=[0;0;0;0;dynamicDayRPowerLineData_temp];
set_param(simulinkFileName+"PData",'OutValues',mat2str(dynamicDayPowerLineData'*1000));
set_param(simulinkFileName+"QData",'OutValues',mat2str(dynamicDayRPowerLineData'*1000));

plt=subplot(2,2,1);
p1=dayPowerData_Power*1000;
plot(p1);
hold on;
plot(out.PValue(6:end,1));
legend("P","P'");
title("有功功率");

plt=subplot(2,2,2);
q1=dayPowerData_RPower*1000;
plot(q1);
hold on;
plot(out.QValue(6:end,1));
legend("Q","Q'");
title("无功功率");

hold on
plt=subplot(2,2,3);
ia=dayPowerData(:,12);
plot(ia);
hold on;
plot(out.IValue(6:end,1));
hold on;
legend("IA","IA'");
title("电流IA");

plt=subplot(2,2,4);
ic=dayPowerData(:,14);
plot(ic);
hold on;
plot(out.IValue(6:end,3));
hold on;
legend("IC","IC'");
title("电流IC");